<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.hz.model.ApplyAct"%>
<%@page import="com.hz.util.ParamUtil"%>
<%@page import="com.hz.control.ApplyActControl"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title>My JSP 'index.jsp' starting page</title>
  </head>
  
  <body>
  <%
       request.setCharacterEncoding("utf-8");
       int acid = ParamUtil.getInt(request,"acid");
        ApplyAct a = new ApplyAct();
       a.setName(ParamUtil.getString(request,"name"));
       a.setActType(ParamUtil.getInt(request,"actType"));
       a.setPurpose(ParamUtil.getString(request,"purpose"));
       a.setObject(ParamUtil.getString(request,"object"));
       a.setLeader(ParamUtil.getString(request,"leader"));
       a.setContact(ParamUtil.getString(request,"contact"));
       a.setHoldTime(ParamUtil.getString(request,"holdTime"));
       //a.setProcedure(ParamUtil.getString(request,"procedures"));
       a.setProcedure(request.getParameter("content1"));
       a.setBudget(ParamUtil.getString(request,"budget"));
       a.setNotes(ParamUtil.getString(request,"notes"));
       a.setUserId(ParamUtil.getInt(request,"userId"));
       
       if(ApplyActControl.updateApplyAct(a,acid)){
       %>
       <script>
       alert("修改申请活动成功");
       window.location.href="ApplyActivities.jsp";
       </script>
       <%
       
       }else{
   %>
   <script>
       alert("修改申请活动失败");
       history.go(-1);
       </script>
       <%} %>
  </body>
</html>
